<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    {block name="title"}
    <title>前台首页</title>
    {/block}
    {block name="css"}
     <link rel="stylesheet" type="text/css" href="/static/home/css/index.css">
    {/block}
</head>

<body>
{block name="nav"}
<div id="header">
    <img src="/static/home/images/logo1.png" alt="logo"/>
    <ul>
        {if $Think.session.user_id}
        <li>欢迎{$Think.session.username}登录CMS系统<a href="{:url('user/logout')}">退出</li>
        {else /}
        <li><a href="{:url('user/register')}">会员注册</a>/</li>
        <li><a href="{:url('user/login')}">登陆</a></li>
        {/if}
    </ul>
</div>

<div id="nav">
    <ul>
        {if $cate_id==0}
        <li><a href="/" class="active">首页</a></li>
        {else /}
        <li><a href="/">首页</a></li>
        {/if}
        {volist name="cate" id="v"}
        {if $v.id==$cate_id}
        <li><a class="active" href="{:url('lists')}?cate_id={$v.id}">{$v.cate_name}</a></li>
        {else /}
        <li><a href="{:url('lists')}?cate_id={$v.id}">{$v.cate_name}</a></li>
        {/if}
        {/volist}
    </ul>
</div>
<div class="blank20"></div>
{/block}

{block name="content"}
<div id="main1">
    <div class="title"><h3>图片新闻</h3><a href="#">更多&gt;&gt;</a></div>
    <ul>
        {volist name="img_news" id="v"}
        <li><a href="{:url('detail')}?id={$v.id}"><img src="{$v.pic_url}" height="178"/></a>
            <p><a href="{:url('detail')}?id={$v.id}">{$v.title|mb_substr=0,10}...</a></p></li>
        {/volist}
    </ul>
</div>

<div class="blank20"></div>

<div class="news">
    <div class="title"><h3>最新新闻</h3><a href="#">更多&gt;&gt;</a></div>
    <ul>
        {volist name="new_news" id="v" key="k"}
        <li><span>{$v.add_time}</span> <a href="{:url('detail')}?id={$v.id}">{$v.title}</a></li>
        {if $k%5==0}
    </ul>
    <ul>
        {/if}
        {/volist}
    </ul>
</div>

<div class="blank20"></div>

<div class="news">
    <div class="title"><h3>最热新闻</h3><a href="#">更多&gt;&gt;</a></div>
    <ul>
        {volist name="hot_news" id="v" key="k"}
        <li><span>{$v.add_time}</span> <a href="{:url('detail')}?id={$v.id}">{$v.title}</a></li>
        {if $k%5==0}
    </ul>
    <ul>
        {/if}
        {/volist}
    </ul>

</div>
{/block}
{block name="footer"}
<div class="blank20"></div>

<div id="footer">
    <p>版权所有&copy;上海快简教育<br/>联系方式：18665455185</p>
</div>

</body>
</html>
{/block}